<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script src="./../../oldVue.js"></script>
</head>

<body>
    <div id="app">
        <div>
            <div>
                <div @click='updateNode'>更新</div>
                <span v-if='oldVal'>更换这里</Span>
            </div>
            <span v-if='newVal'>更换这里</span>
        </div>
    </div>

    <script>

        var app = new Vue({
            el: '#app',
            beforeCreate() { },
            created() { },
            beforeMount() { },
            mounted: () => { },
            beforeUpdate() { },
            updated() { },
            beforeDestroy() { },
            destroyed() { },
            data: function () {
                return {
                    oldVal: true,
                    newVal: false,
                }
            },
            methods: {
                updateNode() {
                    this.oldVal = false
                    this.newVal = true
                }
            }
        })

    </script>

</body>

</html>